﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Generic.App.EntityFrameworkCore.Migrations
{
    public partial class init : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "App_Account",
                columns: table => new
                {
                    Id = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
                    AppId = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
                    AppSecret = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    IsActive = table.Column<bool>(type: "bit", nullable: false),
                    CreatedBy = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "dateTime", nullable: true),
                    LastModifiedBy = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
                    LastModifiedTime = table.Column<DateTime>(type: "dateTime", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_App_Account", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "App_TokenGrey",
                columns: table => new
                {
                    Id = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
                    Token = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
                    CreatedBy = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "dateTime", nullable: true),
                    LastModifiedBy = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
                    LastModifiedTime = table.Column<DateTime>(type: "dateTime", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_App_TokenGrey", x => x.Id);
                });

            migrationBuilder.InsertData(
                table: "App_Account",
                columns: new[] { "Id", "AppId", "AppSecret", "CreatedBy", "CreatedTime", "IsActive", "LastModifiedBy", "LastModifiedTime" },
                values: new object[] { "6a904a8b-e847-459c-86fc-94ecdbe174e3", "Test", "8IhndC4+1+9hvc13NO/YxQ==", null, null, true, null, null });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "App_Account");

            migrationBuilder.DropTable(
                name: "App_TokenGrey");
        }
    }
}
